package bawei.com.adapter;

import android.support.v4.app.Fragment;


import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;



import bawei.com.fragment.AllareasRankFragment;

/**
 * 类描述:
 * 作者：cwm
 * 时间:2017/3/20 20:08
 * 邮箱:18310832074@163.com
 */

public class AllareasRankPagerAdapter extends FragmentStatePagerAdapter {


    String[] strings;
    String[] strings2;

    public AllareasRankPagerAdapter(FragmentManager fm, String[] strings2, String[] strings) {
        super(fm);
        this.strings2 = strings2;
        this.strings = strings;
    }

    @Override
    public Fragment getItem(int position) {
        return AllareasRankFragment.newInstance(strings[position]);

    }

    @Override
    public int getCount() {
        return strings.length;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return strings2[position];
    }
}
